﻿using JinfuyuanProject.Entity;
using JinfuyuanProject.Repository;
using JinfuyuanProject.Repository.Interface;
using JinfuyuanProject.Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JinfuyuanProject.Service
{
    public class RoleAndPageService : IRoleAndPageService
    {
        private readonly IRoleAndPageRepository _roleAndPageRepository;

        public RoleAndPageService(IRoleAndPageRepository roleAndPageRepository)
        {
            _roleAndPageRepository = roleAndPageRepository;
        }
        public IQueryable<RoleAndPage> GetList()
        {
            return _roleAndPageRepository.GetList();
        }
        public bool Delete(RoleAndPage roleAndPage)
        {
            return _roleAndPageRepository.Delete(roleAndPage);
        }
        public RoleAndPage GetModel(int Id)
        {

            return _roleAndPageRepository.GetModel(Id);
        }

        public int Insert(RoleAndPage roleAndPage)
        {

            return _roleAndPageRepository.Insert(roleAndPage);
        }

        public bool Update(RoleAndPage roleAndPage)
        {
            return _roleAndPageRepository.Update(roleAndPage);
        }
    }
}
